package com.bootdo.appsystem.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.bootdo.appsystem.dao.OrderproductitemsDao;
import com.bootdo.appsystem.domain.OrderproductitemsDO;
import com.bootdo.appsystem.service.OrderproductitemsService;



@Service
public class OrderproductitemsServiceImpl implements OrderproductitemsService {
	@Autowired
	private OrderproductitemsDao orderproductitemsDao;
	
	@Override
	public OrderproductitemsDO get(Integer oitemid){
		return orderproductitemsDao.get(oitemid);
	}
	
	@Override
	public List<OrderproductitemsDO> list(Map<String, Object> map){
		return orderproductitemsDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return orderproductitemsDao.count(map);
	}
	
	@Override
	public int save(OrderproductitemsDO orderproductitems){
		return orderproductitemsDao.save(orderproductitems);
	}
	
	@Override
	public int update(OrderproductitemsDO orderproductitems){
		return orderproductitemsDao.update(orderproductitems);
	}
	
	@Override
	public int remove(Integer oitemid){
		return orderproductitemsDao.remove(oitemid);
	}
	
	@Override
	public int batchRemove(Integer[] oitemids){
		return orderproductitemsDao.batchRemove(oitemids);
	}

	@Override
	public List<OrderproductitemsDO> getGoodsProductList(Integer oid) {
        HashMap<String, Object> map = new HashMap<>();
        map.put("oid",oid);
        return this.list(map);
	}

    @Override
    public void chickGoodsProductStatus(Integer oid) {
	    orderproductitemsDao.chickGoodsProductStatus(oid);
    }

}
